package com.lantosec.hmrp.modules.morality.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.morality.vo.MoralityLevelVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评等级定义 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MoralityLevel extends BaseEntity<MoralityLevelVO> {

    private static final long serialVersionUID = 1L;
    public MoralityLevel(MoralityLevelVO vo){
        this.moralityLevelId = vo.getMoralityLevelId();
        this.moralityLevelName = vo.getMoralityLevelName();
    }

    @Override
    public MoralityLevelVO convertToVO(){
        return new MoralityLevelVO(this);
    }


    /**
     * 考评等级ID
     */
    @TableId(value = "morality_level_id", type = IdType.AUTO)
    private Integer moralityLevelId;

    /**
     * 考评等级名称
     */
    private String moralityLevelName;


    public enum ColName {
        morality_level_id, morality_level_name,
    }
}
